


<template>
   <div class="deposit_result">
		<wxc-minibar title="充值完成" ></wxc-minibar>
    
		<div class="result_box">
			<image style="width:290px;height:323px;" src="http://zhongcai-test.oss-cn-beijing.aliyuncs.com/hch5/paysuccess.png"></image>
			<text style="font-family: PingFangSC-Medium;font-size: 40px;color: #333333;margin-top:48px;">恭喜您，充值成功！</text>
			<text style="font-size: 32px;color: #666666;margin-top:16px;">已充值{{money}}元</text>
			<div class="button" style="margin-top:64px;" @click="againrecharge()">
				<text style="font-family: PingFangSC-Medium;font-size: 32px;color: #666666;">继续充值</text>
			</div>
			<div class="button" style="margin-top:48px;" @click="gohome()">
				<text style="font-family: PingFangSC-Medium;font-size: 32px;color: #666666;">立即投注</text>
			</div>
      </div>
   </div>
</template>

<script>
	import WxcMinibar from "@/components/modules/wxc-minibar/index.js"
	import { jsonAnalysis, getBaseUrl, serialize, getUserInfoModel } from "@/utils/index.js";
	const navigator = weex.requireModule("navigator");
	let recharge = new BroadcastChannel('app')
	
	export default {
		data(){
			return {
			money:'',
			baseURL:''
			}
		},
		created () {
			let { money } = jsonAnalysis(weex.config.bundleUrl.split("?")[1])
			this.money = money
			this.baseURL = getBaseUrl(weex.config.bundleUrl, true);

			getUserInfoModel()
		},
		components:{
			WxcMinibar
		},
		methods: {
			
			againrecharge(){
				recharge.postMessage('post')
				navigator.pop()
			},

			gohome(){
				navigator.push({
					'url': this.baseURL + 'index.js',
					'animated': 'true'
				})
				//   modal.toast({message:'回到首页正在解决中...'})
				//   navigator.pop()
			}
		}
	};
</script>
<style scoped>
   .deposit_result{
       position:absolute;
       top: 0;
       left:0;
       right:0;
       bottom: 0;
       background-color: #FFFFFF;
   }
   .result_box{
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     margin-top: 149px;
   }
    .button{
        width: 256px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-width: 2px;
        border-style:solid;
        border-color:#D1D1D1;
        border-radius: 8px;
    }



</style>